Population class extension: condor module

The class extension for the population object that contains the Condor functionality

TODO: there are many uses of $<variable name> in this file but this is not perl and we should replace them by actual format placeholders

class binarycpython.utils.population_extensions.condor.condor(**kwargs)[source]

Bases: object

Extension for the Population class containing the code for Condor grid runs

condorID(ClusterID=None, Process=None)[source]

Function to return a Condor job ID as a string, [ClusterID].[Process]. The ClusterID and Process passed in are used if given, otherwise we default to the condor_ClusterID and condor_Process in population_options.

condor_check_requirements()[source]

Function to check whether the condor parameters in population_options have been set appropriately.

condor_dirs()[source]

Directories associated specifically with this condor job.

condor_grid()[source]

function to be called when running grids when population_options[‘condor’]>=1

if population_options[‘condor’]==1, we set up the condor script and launch the jobs, then return True to exit. if population_options[‘condor’]==2, we run the stars, which means we return False to continue. if population_options[‘condor’]==3, we are being called from the jobs to run the grids, return False to continue.

TODO: split this function into some parts TODO: Comment this function better

condor_outfile(condor_dir=None)[source]

return a standard filename for the condor chunk files

condor_queue_stats()[source]

Return condor queue statistics for this job

condor_status_file(ClusterID=None, Process=None, condor_dir=None)[source]

Return the condor status file corresponding to the ClusterID and Process, which default to population_options condor_ClusterID and condor_Process, respectively.

condorpath(path, condor_dir=None)[source]

Function to return the full condor directory path.

get_condor_status(ClusterID=None, Process=None, condor_dir=None)[source]

Get and return the condor status corresponing to the self object, or ClusterID.Process if they are passed in. If no status is found, returns an empty string..

make_condor_dirs(condor_dir=None)[source]

Function to make the condor directories

set_condor_status(string, condor_dir=None)[source]

Set the condor status corresponing to the self object, which should have condor_ClusterID and condor_Process set.

Parameters
  • string – the status string to be set

  • dir – the directory in which the status directory is held. If not set, this defaults to the HPC directory (e.g. slurm_dir or condor_dir).